function act() {
    if ((cm.isQuestActive(58922) || cm.isQuestActive(58935) || cm.isQuestActive(58963)) && cm.haveItem(4034136, 1)) {
        cm.openScriptNpc()
    }
}
var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.curNodeEventEnd(true);
            cm.eventSKill(0);
            cm.setInGameDirectionMode(true, true, true);
            cm.setStandAloneMode(true);
            cm.fieldEffect_InsertCanvas(1, 255, 0, 0, 0, 0, 0);
            cm.inGameDirectionEvent_AskAnswerTime(1200)
        } else {
            if (status === a++) {
                cm.fieldEffect_InsertCanvas(0, 0, 0, 0, 0, 1000, 0);
                cm.inGameDirectionEvent_AskAnswerTime(1400)
            } else {
                if (status === a++) {
                    cm.sendNormalTalk(" (什么？？)", 17, 0, false, true)
                } else {
                    if (status === a++) {
                        cm.inGameDirectionEvent_AskAnswerTime(1000)
                    } else {
                        if (status === a++) {
                            cm.sendNormalTalk(" 这到底是怎么回事？", 17, 0, false, true)
                        } else {
                            if (status === a++) {
                                cm.sendNormalTalk("嘻嘻，辛苦你啦。多亏了你，搜集到了很多灵魂，这下“她”的愿望就能实现了。", 5, 9130108, true, true)
                            } else {
                                if (status === a++) {
                                    cm.sendNormalTalk("“她”说你虽然装作很精明的样子，但有着无聊的正义感，心肠又软，很容易就会被骗，看来这话不假。", 5, 9130108, true, true)
                                } else {
                                    if (status === a++) {
                                        cm.sendNormalTalk(" 什么？“她”？", 17, 0, true, true)
                                    } else {
                                        if (status === a++) {
                                            cm.sendNormalTalk("我没空在这里浪费时间了，下次你要帮谁的时候，最好还是小心点。", 5, 9130108, true, true)
                                        } else {
                                            if (status === a++) {
                                                cm.sendNormalTalk(" 该死，居然被骗了。", 17, 0, true, true)
                                            } else {
                                                if (status === a++) {
                                                    cm.sendNormalTalk("(追上少年，前往 #m811000019:#吧。自动前往。)", 17, 0, true, true)
                                                } else {
                                                    if (status === a++) {
                                                        cm.fieldEffect_InsertCanvas(1, 255, 0, 0, 0, 500, 0);
                                                        cm.inGameDirectionEvent_AskAnswerTime(500)
                                                    } else {
                                                        if (status === a++) {
                                                            cm.setStandAloneMode(false);
                                                            cm.eventSKill(0);
                                                            cm.warp(811000019, 0, false);
                                                            cm.setInGameDirectionMode(false, true, false);
                                                            if (cm.isQuestActive(58922)) {
                                                                cm.forceCompleteQuest(58922)
                                                            } else {
                                                                if (cm.isQuestActive(58935)) {
                                                                    cm.forceCompleteQuest(58935)
                                                                } else {
                                                                    if (cm.isQuestActive(58963)) {
                                                                        cm.forceCompleteQuest(58963)
                                                                    }
                                                                }
                                                            }
                                                            cm.gainItem(4034136, -1);
                                                            cm.dispose()
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
};